EXC_BAD_ACCESS on [error localizedDescription];

Posted by david on Stack Overflow See other posts from Stack Overflow or by david
Published on 2010-03-17T12:12:10Z Indexed on 2010/03/17 12:21 UTC
Read the original article Hit count: 468

This Code trows an EXC_BAD_ACCESS:

 NSError* error;
    if(![appdelegate.managedObjectContext countForFetchRequest:request error:&error]) {
        DLog(@"Failed to save to data store: %@", [error localizedDescription]);
        NSArray* detailedErrors = [[error userInfo] objectForKey:NSDetailedErrorsKey];
        if(detailedErrors != nil && [detailedErrors count] > 0) {
            for(NSError* detailedError in detailedErrors) {
                DLog(@"  DetailedError: %@", [detailedError userInfo]);
            }
        }
        else {
            DLog(@"  %@", [error userInfo]);
        }
    }

© Stack Overflow or respective owner

Related posts about core-data

Related posts about iphone